import io.reactivex.Observable;

public class C06a {
    public static void main(String[] args) {
        Observable<String> source = Observable.just("Alpha", "Beta", "Gamma", "Delta", "Epsilon");
        /* 可以省略 onComplete; 可以省略 onError 和 onComplete*/
        source.map(String::length)
              .filter(i -> i >= 5)
              .subscribe(i -> System.out.println("RECEIVED: " + i),
                        Throwable::printStackTrace,
                        () -> System.out.println("Done!"));
    }

}
//EOP
